import { GCellRenderer } from "../../../../com/mui/controls/GCellRenderer";
import { ObjCreate } from "../common/ObjCreate";
import { ImagesConst } from "../../resource/ImagesConst";
import { BaseItem } from "../common/BaseItem";
import { ItemData } from "../../resource/info/ItemData";
import { ScaleBitmap } from "../../../../com/mui/display/ScaleBitmap";
type int = number;
//class DramaLotteryDesRender
    
    export  class DramaLotteryDesRender extends GCellRenderer
    {
        constructor()
        {
            super();
            this.initView();
            return;
        }

        /* internal  */initView(): void
        {
            this._itemBg = ObjCreate.createBg(0, 0, 66, 66, this, ImagesConst.PackItemBg);
            this._baseItem = new BaseItem();
            this._baseItem.move(3, 3);
            this._baseItem.setSize(60, 60);
            this._baseItem.isDragAble = false;
            this._baseItem.isDropAble = false;
            addChild(this._baseItem);
            return;
        }

        public /* override */ set data(arg1: Object)
        {
            super.data = arg1;
            this._itemCode = arg1.itemCode as int;
            if (this._itemCode > 0) 
            {
                this._itemData = new ItemData(this._itemCode);
                if (this._itemData.itemInfo !== null) 
                {
                    this._baseItem.itemData = this._itemData;
                    this._baseItem.isShowToolTip = true;
                }
            }
            return;
        }

        /* internal */ /* var */_baseItem: BaseItem;

        /* internal */ /* var */_itemBg: ScaleBitmap;

        /* internal */ /* var */_itemCode: int;

        /* internal */ /* var */_itemData: ItemData;
    }
